
<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.io.PrintWriter"%>
<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8"%>

<!doctype html>
<html class="no-js">
<head>
<%@ include file="../commoms/link.txt"%>
<meta name="description" content="EmployeeInfo">
<style type="text/css">
label {
	font-family: sans-serif;
}

div[name] {
	padding: 20px, 10px, 10px, 20px;
}

h2 {
	margin: 10px;
	padding: 10px;
	font-family: sans-serif;
	background-color: #F0FFFF;
}
#birthday{
background-color: #FFFFFF;
 cursor:pointer;
}
</style>
</head>
<body>
	<%@ include file="../commoms/EEHeader.txt"%>

	<!-- sidebar end -->

	<!-- content start -->
	<div class="admin-content">
		<div class="am-cf am-padding">
			<div class="am-fl am-cf">
				<strong class="am-text-primary am-text-lg">个人资料</strong>
			</div>
		</div>

		<hr />

		<div class="am-g">
			<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
				<div class="am-panel am-panel-default">
					<div class="am-panel-bd">
						<div class="am-g">
							<div class="am-u-md-4">
								<img class="am-img-circle am-img-thumbnail" id="logo" alt="用户头像" />
							</div>
							<div class="am-u-md-8">
								<p>
									你可以使用<a href="#">gravatar.com</a>提供的头像或者使用本地上传头像。
								</p>
								  <button type="button" onclick="javascript:window.location.href='/upload/uploadicon.jsp?page=1'" class="am-btn am-btn-primary am-btn-lg">上传头像</button>
							</div>
						</div>
					</div>
				</div>


			</div>

			<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
				<form class="am-form am-form-horizontal" action="finishEEInfo.do"
					id="finishEEInfoformtooltip" data-am-validator method="post">
					<div id="baseInfo">
						<h2>基本信息</h2>
						<div class="am-form-group">
							<label for="EmployeeName" class="am-u-lg-3 am-form-label">真实姓名</label>
							<div class="am-u-lg-9">
								<input type="text" id="EmployeeName" placeholder="姓名"
									name="realname" required="required" data-foolish-msg="请输入您的姓名">
							</div>
						</div>
						<div class="am-form-group">
							<label for="EmployeeNickName" class="am-u-lg-3 am-form-label">昵称</label>
							<div class="am-u-lg-9">
								<input type="text" id="EmployeeNickName" placeholder="昵称"
									name="username">
							</div>
						</div>

						<div class="am-form-group">
							<label class="am-u-lg-3 am-form-label" for="sex">性别</label>

							<div id="sex" class="am-u-lg-9">

								<label class="am-radio-inline"> <input type="radio"
									name="gender" value="13" id="boy">男
								</label> <label class="am-radio-inline"> <input type="radio"
									name="gender" value="14" id="girl">女
								</label>
							</div>


						</div>

						<div class="am-form-group">
							<label for="birthday" class="am-u-lg-3 am-form-label">出生日期</label>
							<div class="am-u-lg-9">
								<input type="text" id="birthday" placeholder="出生日期"
									name="birthday" data-am-datepicker readonly required>
							</div>

						</div>


						<div class="am-form-group">
							<label for="JobPrefered" class="am-u-lg-3 am-form-label">兼职订阅</label>
							<div class="am-u-lg-9">
								<select id="JobPrefered" class="am-form-field"
									name="bookpttypeids" multiple data-am-selected>

									<option value="1">传单派发</option>
									<option value="2">促销导购</option>
									<option value="3">话务客服</option>
									<option value="4">礼仪模特</option>
									<option value="5">老师家教</option>
									<option value="6">服务员</option>
									<option value="7">问卷调查</option>
									<option value="8">审核录入</option>
									<option value="9">地推拉访</option>
									<option value="10">其它</option>


								</select>
							</div>
						</div>

						<div class="am-form-group">
							<label class="am-u-lg-3 am-form-label" for="_inschoolid">是否在读</label>

							<div id="_inschoolid" class="am-u-lg-9">
								<label class="am-radio-inline"> <input type="radio"
									name="inschoolid" value="11" id="inschool">是
								</label> <label class="am-radio-inline"> <input type="radio"
									name="inschoolid" value="12" id="notinshcool">否
								</label>
							</div>



						</div>

						<div class="am-form-group">
							<label for="school" class="am-u-lg-3 am-form-label">就读院校</label>
							<div class="am-u-lg-9">
								<input type="text" id="school" placeholder="就读院校" name="school"
									required="required">
							</div>
						</div>
						<div class="am-form-group">
							<label for="major" class="am-u-lg-3 am-form-label">所选专业</label>
							<div class="am-u-lg-9">
								<input type="text" id="major" name="major" placeholder="所选专业">
							</div>
						</div>

						<div class="am-form-group">
							<label for="theyear" class="am-u-lg-3 am-form-label">入学年份</label>
							<div class="am-u-lg-9">
								<input type="text" id="theyear" placeholder="yyyy"
									pattern="((19|20)\d{2})" name="theyear">

							</div>
						</div>


						<div class="am-form-group">
							<label for="EnterpriseCommission" class="am-u-lg-3 am-form-label">就职宣言</label>
							<div class="am-u-lg-9">
								<textarea rows="5" id="EnterpriseCommission" name="tellus"
									class="am-form-field am-inline" style="width: 75%"
									placeholder="输入就职宣言，如果没有请勿填写，限制30字"></textarea>



							</div>
						</div>
					</div>




					<div id="EnterpriseContactInformation">
						<h2>联系方式</h2>

						<div class="am-form-group">
							<label for="wechatid" class="am-u-lg-3 am-form-label">微信号</label>
							<div class="am-u-lg-9">
								<input type="text" id="wechatid" name="wechatid"
									placeholder="请输入微信号">

							</div>
						</div>
						<div class="am-form-group">
							<label for="email" class="am-u-lg-3 am-form-label">电子邮件</label>
							<div class="am-u-lg-9">
								<input type="email" id="email" name="email"
									placeholder="输入你的电子邮件" data-foolish-msg="请输入电子邮件">

							</div>
						</div>


						<div class="am-form-group">
							<div class="am-u-lg-9 am-u-sm-push-3">
								<button class="am-btn am-btn-primary">保存修改</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>

	</div>

	<a href="#"
		class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
		data-am-offcanvas="{target: '#admin-offcanvas'}"></a>


	<script type="text/javascript">
		myAjax('/showEEInfo.do', {}, function(data) {

			if(data.labelid!=null)
				$('#logo').attr('src',data.labelid);

			if (data.realname != null)
				$('#EmployeeName').val(data.realname);
			if (data.username != null)
				$('#EmployeeNickName').val(data.username);
			if (data.email != null)
				$('#email').val(data.email);
			if (data.wechatid != null)
				$('#wechatid').val(data.wechatid);
			if (data.tellus != null)
				$('#EnterpriseCommission').text(data.tellus);
			if (data.theyear != null)
				$('#theyear').val(data.theyear);
			if (data.major != null)
				$('#major').val(data.major);
			if (data.school != null)
				$('#school').val(data.school);
			if (data.birthday != null)
				$('#birthday')
						.val(new Date(data.birthday).Format("yyyy-MM-dd"));

			if (data.inschoolid != null) {
				
				if (data.inschoolid == '11')
					{
					$('#inschool').prop('checked', true);
					}
				else
					$('#notinshcool').prop('checked', true);
			}
			else
				$('#inschool').prop('checked', true);
			if (data.gender != null) {
				if (data.gender == '13')
			
					$('#boy').prop('checked', true);
				else
					$('#girl').prop('checked', true);
			}
			else
				$('#boy').prop('checked', true);
			if (data.bookpttypeids != null) {
				$.each(data.bookpttypeids.split('&'), function(index, item)
				{
				if(item.trim()!='')
					
					$('#JobPrefered').children().eq(item).attr('selected', 'selected');
				});
			}
		

		});
		var $form = $('#finishEEInfoformtooltip');
		setFormValidate($form);
		Date.prototype.Format = function(fmt) { // author: meizz
			var o = {
				"M+" : this.getMonth() + 1, // 月份
				"d+" : this.getDate(), // 日
				"h+" : this.getHours(), // 小时
				"m+" : this.getMinutes(), // 分
				"s+" : this.getSeconds(), // 秒
				"q+" : Math.floor((this.getMonth() + 3) / 3), // 季度
				"S" : this.getMilliseconds()

			};
			if (/(y+)/.test(fmt))
				fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "")
						.substr(4 - RegExp.$1.length));
			for ( var k in o)
				if (new RegExp("(" + k + ")").test(fmt))
					fmt = fmt.replace(RegExp.$1,
							(RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k])
									.substr(("" + o[k]).length)));
			return fmt;
		}
	</script>
</body>
</html>
